package com.zyk.controller;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

import com.zyk.service.ProductClientService;

import entity.Product;
@org.springframework.web.bind.annotation.RestController
public class ProductController_Feign {
	@Autowired
	private ProductClientService service;
	@RequestMapping(value="/consumer/product/add")
	public boolean add(Product product) {
		return service.add(product);
	}
	@RequestMapping(value= "/consumer/product/get/{id}")
	public Product get(@PathVariable(value="id")Long id) {
		return service.get(id);
	}
	@RequestMapping(value="/consumer/product/list")
	public List<Product> list(){
		return service.list();
	}
}
